<template>
	<view>
		<text>
			w我是组件
			<view>{{msg}}</view>
			w我是组件
			<view>
				<button @click="sayHelloToFather"> 通信 </button>
			</view>
		</text>

	</view>
</template>

<script>
	export default {
		props: ['msg'],
		name: "child",
		data() {
			return {

			};
		},
		methods: {
			sayHelloToFather() {
				this.$emit('childEvent',"蜡笔小新")
				//全局事件
				uni.$emit('getInfo','樱桃小丸子')
			}
		}
	}
</script>

<style scoped>
	/* * {
		color: red;
	} */
</style>